#ifndef VIEWDOCUMENTS_H
#define VIEWDOCUMENTS_H

#include <QDialog>

class Document;
class QShowEvent;
class QCloseEvent;

namespace Ui {
class ViewDocuments;
}

class ViewDocuments : public QDialog
{
    Q_OBJECT
    
public:
    explicit ViewDocuments(QWidget *parent = 0);
    ~ViewDocuments();
protected:
    void showEvent(QShowEvent* pEvent);
    void closeEvent(QCloseEvent* pEvent);
private:
    Ui::ViewDocuments *ui;
private slots:
    void onDocumentCreated(QPointer<Document> doc);
    void onDocumentRemoved(QPointer<Document> doc);
    void onActiveDocumentChanged(QPointer<Document> doc);

    void on_pushSetActive_clicked();
    void on_pushDelete_clicked();
signals:
    void visibilityChanged(bool bVisible);
    void closeDocument(QPointer<Document> doc);
};

#endif // VIEWDOCUMENTS_H
